"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _jsxRuntime = require("react/jsx-runtime");

require("./index.less");

var ProCardActions = function ProCardActions(props) {
  var actions = props.actions,
      prefixCls = props.prefixCls;

  if (Array.isArray(actions) && (actions === null || actions === void 0 ? void 0 : actions.length)) {
    return (0, _jsxRuntime.jsx)("ul", {
      className: "".concat(prefixCls, "-actions"),
      children: actions.map(function (action, index) {
        return (// eslint-disable-next-line react/no-array-index-key
          (0, _jsxRuntime.jsx)("li", {
            style: {
              width: "".concat(100 / actions.length, "%")
            },
            children: (0, _jsxRuntime.jsx)("span", {
              children: action
            })
          }, "action-".concat(index))
        );
      })
    });
  }

  if (actions) return (0, _jsxRuntime.jsx)("ul", {
    className: "".concat(prefixCls, "-actions"),
    children: actions
  });
  return null;
};

var _default = ProCardActions;
exports.default = _default;